#include "heard.h"


int init_status(status_t *pool, int num){
    
    pool->num = num;
    pool->tids = (pthread_t*)malloc(num*sizeof(pthread_t));
    pthread_mutex_init(&pool->lock, NULL);
    pthread_cond_init(&pool->cond, NULL);
    memset(&pool->b_queue,0, sizeof(queue_t));

    for(int i=0; i<num; i++){

        pthread_create(&pool->tids[i],NULL,thread_main,pool);
    }

    return 0;

}
